package com.noisyair.android.alvin.apps.sms;


import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

import com.noisyair.android.alvin.activities.AlvinActivity;

public class MainActivity extends AlvinActivity {
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
        Button b = (Button)findViewById(R.id.sendsmsactivitybutton);
        b.setOnClickListener(mGoListener);
        
        b = (Button)findViewById(R.id.viewsmsactivitybutton);
        b.setOnClickListener(mGoListener);
    }
    
    private OnClickListener mGoListener = new OnClickListener()
    {
        public void onClick(View v)
        {
            
            Intent intent = new Intent();
            if(v == findViewById(R.id.sendsmsactivitybutton)){
                intent.setClass(MainActivity.this, SendSMSActivity.class);
            }
            else if(v == findViewById(R.id.viewsmsactivitybutton)){
                intent.setClass(MainActivity.this, ViewMessagesActivity.class);
            }
            startActivity(intent);
        }
    };
}